package com.dimenlink.entity.constants;

public class Constants {
    public static final Integer ONE = 1 ;
    public static final Integer ZERO = 0 ;
    // 长度
    public static final Integer LENGTH_2 = 2;
    public static final Integer LENGTH_10 = 10;
    public static final Integer LENGTH_15 = 15;
    public static final Integer LENGTH_20 = 20;
    public static final Integer LENGTH_30 = 30;
    public static final Long MB_SIZE = 1024 * 1024L;
    // 密码正则
    public static final String REGEX_PASSWORD = "^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])[0-9A-Za-z]{8,18}$";
    // redis key 过期时间 1 分钟
    public static final Integer REDIS_KEY_EXPIRE_ONE_MINUTE = 60000;
    // redis key 过期时间 1 天
    public static final Integer REDIS_KEY_EXPIRE_ONE_DAY = 86400000;
    // 过期时间 1 天
    public static final Integer Time_SECONDS_DAY = 86400;
    // 本项目redis key 前缀
    public static final String REDIS_KEY_PREFIX = "dimenlink:";
    public static final String REDIS_KEY_CATEGORY_LIST = REDIS_KEY_PREFIX + "category:list:";
    public static final String FILE_FOLDER_TEMP = "temp/";
    public static final String FILE_FOLDER = "/file/";
    public static final String FILE_COVER = "cover/";
    public static final String FILE_VIDEO = "video/";

    public static final String IMAGE_THUMBNAIL_SUFFIX = "_thumbnail.jpg";
    public static final String REDIS_KEY_UPLOADING_FILE = REDIS_KEY_PREFIX + "uploading:";
    public static final String REDIS_KEY_SYS_SETTING = REDIS_KEY_PREFIX + "sysSetting:";
    public static final String REDIS_KEY_FILE_DEL = REDIS_KEY_PREFIX + "file:list:del";
    public static final String REDIS_KEY_FILE_TRANSFER = REDIS_KEY_PREFIX + "queue:transfer";
    public static final String TEMP_VIDEO_NAME = "/temp.mp4";

    // redis 验证码 key 前缀
    public static String REDIS_KEY_CHECK_CODE = REDIS_KEY_PREFIX + "checkCode:";

    public static String REDIS_KEY_TOKEN_WEB = REDIS_KEY_PREFIX + "token:web:";
    public static String REDIS_KEY_TOKEN_ADMIN = REDIS_KEY_PREFIX + "token:admin:";
    public static String TOKEN_WEB = "token";
    public static String TOKEN_ADMIN = "AdminToken";
    //初始化硬币数目：10
    public static final Integer INIT_COIN_COUNT = 10;

    // 视频编码格式
    public static final String VIDEO_CODE_HEVC = "hevc";
    public static final String VIDEO_CODE_H264 = "h264";//mp4
    public static final String TS_NAME = "index.ts";
    public static final String M3U8_NAME = "index.m3u8";

    public static final String VIDEO_CODE_TEMP_FILE_SUFFIX = "_temp";
}
